<?xml version="1.0" encoding="utf-8"?>
<taskrunner name="remove.jboss" version="1.0.1" date="2007-09-19" maxthreads="1">


  <includes>
    <file name="vida.install.settings.xml" />
  </includes>

  <properties>
   

  </properties>

  <tasks>

    <task name="check.root.dir" typename="@DirectoryExists">
      <parameters>
        <parameter name="directory" value="${target.root}"/>
        <parameter name="output.value" value="root.dir.exists"/>
      </parameters>
    </task>

    <task name="check.jdk.dir" typename="@DirectoryExists">
      <parameters>
        <parameter name="directory" value="${target.root}\jdk"/>
        <parameter name="output.value" value="jdk.dir.exists"/>
      </parameters>
    </task>

    <task name="change.attributes.on.root" condition="¤{root.dir.exists}=true" typename="@CommandLine">

      <description>
        removes the attribute read-only on all files in the dvdinput directory.
      </description>
      <dependencies list="check.root.dir"/>
      <parameters>
        <parameter name="arguments" value="attrib -r /s"/>
        <parameter name="workingdirectory" value="${target.root}"/>
        <parameter name="useCmdExe" value="true"/>
      </parameters>
    </task>

    <task name="change.attributes.on.jdk" condition="¤{jdk.dir.exists}=true" typename="@CommandLine">

      <description>
        removes the attribute read-only on all files in the dvdinput directory.
      </description>
      <dependencies list="check.jdk.dir,change.attributes.on.root"/>
      <parameters>
        <parameter name="arguments" value="attrib -r /s"/>
        <parameter name="workingdirectory" value="${target.root}\jdk"/>
        <parameter name="useCmdExe" value="true"/>
      </parameters>
    </task>

    <task name="check.system.dir" typename="@DirectoryExists">
      <parameters>
        <parameter name="directory" value="${target.application.dir}\system"/>
        <parameter name="output.value" value="system.dir.exists"/>
      </parameters>
    </task>

    <task name="change.attributes.on.system" condition="¤{system.dir.exists}=true" typename="@CommandLine">

      <description>
        removes the attribute read-only on all files in the dvdinput directory.
      </description>
      <dependencies list="check.system.dir"/>
      <parameters>
        <parameter name="arguments" value="attrib -r /s"/>
        <parameter name="workingdirectory" value="${target.application.dir}\system"/>
        <parameter name="useCmdExe" value="true"/>
      </parameters>
    </task>

    <task name="check.directory" typename="@DirectoryExists">
      <parameters>
        <parameter name="directory" value="${target.application.dir}\jboss"/>
        <parameter name="output.value" value="jboss.dir.exists"/>
      </parameters>
    </task>
    
    <task name="change.attributes" condition="¤{jboss.dir.exists}=true" typename="@CommandLine">
      
      <description>
        removes the attribute read-only on all files in the dvdinput directory.
      </description>
      <dependencies list="check.directory"/>
      <parameters>
        <parameter name="arguments" value="attrib -r /s"/>
        <parameter name="workingdirectory" value="${target.application.dir}\jboss"/>
        <parameter name="useCmdExe" value="true"/>
      </parameters>
    </task>

    <task name="kill.java">
      <subtasks filename="vida.kill.java.xml"/>
    </task>

    <task name="delete.jboss" typename="@DeleteDirectory" critical="false">
      <dependencies list="kill.java,change.attributes"/>
      <parameters>
        <parameter name="directory" value="${target.application.dir}\jboss"/>
      </parameters>
    </task>
    
    <task name="delete.jdk" condition="¤{jdk.dir.exists}=true" typename="@DeleteDirectory" critical="false">
      <dependencies list="kill.java,change.attributes.on.jdk"/>
      <parameters>
        <parameter name="directory" value="${target.application.dir}\jdk"/>
      </parameters>
    </task>
    
  </tasks>
</taskrunner>
